home *** CD-ROM | disk | FTP | other *** search
/ Aminet 28 / Aminet 28 (1998)(GTI - Schatztruhe)[!][Dec 1998].iso / Aminet / dev / c / dice-3.16.lha / doc / TUTORIAL < prev    next >
Text File  |  1994-02-13  |  28KB  |  678 lines

  1. Every Emacs and Emacs varient I've ever used has had some variation
  2. of this file.  AME is no different.  For its TUTORIAL, I've found the
  3. GNU tutorial and modified it to match AME and the Amiga.  After all, 
  4. Emacs just isn't Emacs without a tutorial.    - andy finkel
  5. ---------------
  6. Copyright (c) 1985 Free Software Foundation, Inc;  See end for conditions.
  7.  
  8.  
  9. You are looking at the AME tutorial.
  10.  
  11. AME commands generally involve the CONTROL key (labelled
  12. CTRL) or the META key (labelled ESC).  Rather than
  13. write out META or CONTROL each time we want you to prefix a character,
  14. we'll use the following abbreviations:
  15.  
  16.  C-<chr>  means hold the CONTROL key while typing the character <chr>
  17.       Thus, C-f would be: hold the CONTROL key and type f.
  18.  M-<chr>  means type <ESC>, release it, then type the character <chr>.  
  19.       "<ESC>" stands for the key labelled "ESC".  The M stands
  20.       for Meta.
  21.  
  22. Important note: to end the AME session, type C-c.  (One character.)
  23.  
  24. Other important note:  In the various AME displays, a control character
  25. will be displayed with a leading caret, ie ^C is control C.
  26.  
  27. The characters ">>" at the left margin indicate directions for you to
  28. try using a command.  For instance:
  29. <<Blank lines inserted here by startup of help-with-tutorial>>
  30. >>  Now type C-v (View next screen) to move to the next screen.
  31.     (go ahead, do it by depressing the control key and v together).
  32.     From now on, you'll be expected to do this whenever you finish
  33.     reading the screen.
  34.  
  35. Note that there is an overlap when going from screen to screen; this
  36. provides some continuity when moving through the file.
  37.  
  38. The first thing that you need to know is how to move around from
  39. place to place in the file.  You already know how to move forward a
  40. screen, with C-v.  To move backwards a screen, type M-v (which is <ESC>v).
  41.  
  42. >>  Try typing M-v and then C-v to move back and forth a few times.
  43.  
  44.  
  45. SUMMARY
  46. -------
  47.  
  48. The following commands are useful for viewing screenfuls:
  49.  
  50.     C-v    Move forward one screenful
  51.     M-v    Move backward one screenful
  52.     C-l    Clear screen and redisplay everything
  53.          putting the text near the cursor at the center.
  54.          (That's control-L, not control-1.
  55.           There is no such character as control-1.)
  56.  
  57. >> Find the cursor and remember what text is near it.
  58.    Then type a C-l.
  59.    Find the cursor again and see what text is near it now.
  60.  
  61.  
  62. BASIC CURSOR CONTROL
  63. --------------------
  64.  
  65. Getting from screenful to screenful is useful, but how do you
  66. reposition yourself within a given screen to a specific place?
  67. There are several ways you can do this.  One way (not the best, but
  68. the most basic) is to use the commands previous, backward, forward
  69. and next.  As you can imagine these commands (which are given to
  70. AME as C-p, C-b, C-f, and C-n  respectively) move the cursor from
  71. where it currently is to a new place in the given direction.  Here,
  72. in a more graphical form are the commands:
  73.  
  74.               Previous line, C-p
  75.                   :
  76.                   :
  77.    Backward, C-b .... Current cursor position .... Forward, C-f
  78.                   :
  79.                   :
  80.               Next line, C-n
  81.  
  82. >> Move the cursor to the line in the middle of that diagram
  83.    and type C-l to see the whole diagram centered in the screen.
  84.  
  85. You'll probably find it easy to think of these by letter.  P for
  86. previous, N for next, B for backward and F for forward.  These are
  87. the basic cursor positioning commands and you'll be using them ALL
  88. the time so it would be of great benefit if you learn them now.
  89.  
  90. In AME, the cursor arrow keys work as well;  Cursor Up arrow is
  91. previous line, cursor down arrow is next line, cursor left arrow is backward, 
  92. cursor right arrow is forward.  This may be more convenient than using the
  93. control sequences.
  94.  
  95. >> Do a few C-n's to bring the cursor down to this line.
  96.  
  97. >> Move into the line with C-f's and then up with C-p's.
  98.    See what C-p does when the cursor is in the middle of the line.
  99.  
  100. Lines are separated by Newline characters.  For most applications
  101. there should normally be a Newline character at the end of the text,
  102. as well, but it is up to you to make sure of this.  A file can
  103. validly exist without a Newline at the end.
  104.  
  105. >> Try to C-b at the beginning of a line.  Do a few more C-b's.
  106.    Then do C-f's back to the end of the line and beyond.
  107.  
  108. When you go off the top or bottom of the screen, the text beyond
  109. the edge is shifted onto the screen so that your instructions can
  110. be carried out while keeping the cursor on the screen.
  111.  
  112. >> Try to move the cursor off the bottom of the screen with C-n and
  113.    see what happens.
  114.  
  115. If moving by characters is too slow, you can move by words.  M-f
  116. (Meta-f) moves forward a word and M-b moves back a word.
  117.  
  118. >> Type a few M-f's and M-b's.  Intersperse them with C-f's and C-b's.
  119.  
  120. Notice the parallel between C-f and C-b on the one hand, and M-f and
  121. M-b on the other hand.  Very often Meta characters are used for
  122. operations related to English text whereas Control characters operate
  123. on the basic textual units that are independent of what you are
  124. editing (characters, lines, etc).
  125.  
  126. >> Try a couple of C-a's, and then a couple of C-e's.
  127.  
  128. See how repeated C-a's do nothing.  Do you think that this is right?
  129.  
  130. Note:  in AME, shift-cursor left acts the same as C-a , and 
  131. shift-cursor right acts the same as C-e.
  132.  
  133. Two other simple cursor motion commands are M-< (Meta Less-than),
  134. which moves to the beginning of the file, and M-> (Meta Greater-than),
  135. which moves to the end of the file.  You probably don't need to try
  136. them, since finding this spot again will be boring.  On most terminals
  137. the "<" is above the comma and you must use the shift key to type it.
  138. On these terminals you must use the shift key to type M-< also;
  139. without the shift key, you would be typing M-comma.
  140.  
  141. The location of the cursor in the text is also called "point".  To
  142. paraphrase, the cursor shows on the screen where point is located in
  143. the text.
  144.  
  145. Here is a summary of simple moving operations including the word and
  146. sentence moving commands:
  147.  
  148.     C-f    (Cursor Right)    Move forward a character
  149.     C-b    (Cursor Left)    Move backward a character
  150.  
  151.     M-f    Move forward a word
  152.     M-b    Move backward a word
  153.  
  154.     C-n    (Cursor Down)    Move to next line
  155.     C-p    (Cursor Up)    Move to previous line
  156.  
  157.     C-a    (Shift Left)    Move to beginning of line
  158.     C-e    (Shift Right)    Move to end of line
  159.  
  160.     M-<    Go to beginning of file
  161.     M->    Go to end of file
  162.  
  163. >> Try all of these commands now a few times for practice.
  164.    Since the last two will take you away from this screen,
  165.    you can come back here with M-v's and C-v's.  These are
  166.    the most often used commands.
  167.  
  168. Like all other commands in AME, these commands can be given
  169. arguments which cause them to be executed repeatedly.  The way you
  170. give a command a repeat count is by typing C-u and then the digits
  171. before you type the command.  
  172.  
  173. For instance, C-u 8 C-f moves forward eight characters.
  174.     
  175. >> Try giving a suitable argument to C-n or C-p to come as close
  176.    as you can to this line in one jump.
  177.  
  178.  
  179. WHEN AME IS HUNG
  180. -----------------
  181.  
  182. If AME gets into an infinite (or simply very long) computation which
  183. you don't want to finish, you can stop it safely by typing C-g.
  184. You can also use C-g to discard a numeric argument or the beginning of
  185. a command that you don't want to finish.
  186.  
  187. >> Type C-u 100 to make a numeric arg of 100, then type C-g.
  188.    Now type C-f.  How many characters does it move?
  189.    If you have typed an <ESC> by mistake, you can get rid of it
  190.    with a C-g.
  191.  
  192.  
  193. WINDOWS
  194. -------
  195.  
  196. AME can have several windows, each displaying its own text.
  197. At this stage it is better not to go into the techniques of
  198. using multiple windows.  But you do need to know how to get
  199. rid of extra windows that may appear to display help or
  200. output from certain commands.  It is simple:
  201.  
  202.     C-x 1    One window (i.e., kill all other windows).
  203.  
  204. That is Control-x followed by the digit 1.
  205. C-x 1 makes the window which the cursor is in become
  206. the full screen, by getting rid of any other windows.
  207.  
  208. >> Move the cursor to this line and type C-u 0 C-l.
  209. >> Type ESC-? move
  210.    See how this window shrinks, while a new one appears
  211.    to display a listing of the commands that contain move.
  212.  
  213. >> Type C-x 1 and see the help window disappear.
  214.  
  215.  
  216. INSERTING AND DELETING
  217. ----------------------
  218.  
  219. If you want to insert text, just type it.  Characters which you ca